import request from '@/utils/request'

// 获取部门数据
export const getDepartments = () => request({
  url: '/company/department'
})

// 删除部门
export const delDepartments = id => request({
  url: '/company/department/' + id,
  method: 'DELETE'
})
// 添加部门
export const addDepartments = data => request({
  url: '/company/department',
  method: 'post',
  data
})
// 获取部门详情
export const getDepartmentDetail = id => request({
  url: '/company/department/' + id
})
// 更新部门
export const updateDepartments = data => request({
  url: `/company/department/${data.id}`,
  method: 'put',
  data
})
